Unit ustuInfoDM;

interface

uses SysUtils, Classes, InvokeRegistry, Midas, SOAPMidas, SOAPDm, Provider, DB,
  ADODB, DBClient,Windows;

type
  IstuInfoDM = interface(IAppServerSOAP)
    ['{6DB25744-AAD7-47ED-AEBF-65FF3A4D1A1B}']
  end;

  TstuInfoDM = class(TSoapDataModule, IstuInfoDM, IAppServerSOAP, IAppServer)
    ADOConnection1: TADOConnection;
    DataSet_Query: TADODataSet;
    DSP_Query: TDataSetProvider;
    cds_Query: TClientDataSet;
    DataSet_Temp: TADODataSet;
    ADOQuery_Temp: TADOQuery;
    DataSet_Update: TADODataSet;
    DSP_Update: TDataSetProvider;
    cds_Update: TClientDataSet;
    procedure SoapDataModuleCreate(Sender: TObject);
    procedure SoapDataModuleDestroy(Sender: TObject);
  private

  public
  end;

implementation
uses uDbConnect;

{$R *.DFM}

procedure TstuInfoDMCreateInstance(out obj: TObject);
begin
 obj := TstuInfoDM.Create(nil);
end;

procedure TstuInfoDM.SoapDataModuleCreate(Sender: TObject);
var
  vHost,vSa,vPwd,vDb,vMode:string;
begin
  ADOConnection1.Connected := False;
  ADOConnection1.ConnectionString := ReadConnInfo(0,vHost,vDb,vSa,vPwd,vMode);
  //ADOConnection1.Connected := True;
end;

procedure TstuInfoDM.SoapDataModuleDestroy(Sender: TObject);
begin
  ADOConnection1.Connected := False;
end;

initialization
   InvRegistry.RegisterInvokableClass(TstuInfoDM, TstuInfoDMCreateInstance);
   InvRegistry.RegisterInterface(TypeInfo(IstuInfoDM));
end.
